#include<stdio.h>
#include<stdlib.h>
#include<signal.h>
#include<sys/types.h>
#include<sys/wait.h>


int main()
{
	pid_t pid;
	int ret;
	if( (pid = fork()) < 0  )
	{
		printf("fork Error \n");
		exit(1);
	}	 	
	if(pid == 0)
	{
		printf("Child(pid : %d) is Waiting for any signeal \n", getpid());
 		raise(SIGSTOP); 
		exit(0);	
	}
	else
	{
			if( (waitpid(pid , NULL , WNOHANG))==0 )
			{
				printf("Parent(pid : %d) is Running \n ", getpid());
				sleep(3);
				if( (ret = kill(pid,SIGKILL))==0 )
				{
					printf("Parent kill pid  %d  \n ", getpid());
				}else
				{
					printf("Parent kill Error  \n ");			
				}
				
			}
			
			waitpid(pid , NULL , 0);
			exit(0);
	}
}
